import React, { Component } from 'react'
import { Space } from 'antd'

class Index extends Component {
    render() {
        const { create_user_name, context, create_date, unread } = this.props.notice || {}
        const { check, deleted } = this.props
        return <div style={{
            backgroundColor: '#efefef',
            borderRadius: '5px',
            borderBottom: '1px solid #afafaf',
            padding: '8px',
        }}>
            <div style={{
                width: '100%',
                display: 'flex',
                justifyContent: 'space-between',
                marginBottom: '2px'
            }}>
                <Space>
                    <strong>{create_user_name}</strong>
                    <span style={{
                        fontSize: '12px',
                        color: '#afafaf'
                    }}>{create_date}</span>
                </Space>
                <div>
                    {unread === 0 ?
                        <a onClick={check}>查收</a> : ''}
                    {/* <a onClick={deleted} style={{
                        marginLeft:'5px'
                    }}>删除</a> */}
                </div>
            </div>
            <div>
                {context}
            </div>
        </div>
    }
}
export default Index
